#ifndef RTP_H
#define RTP_H




/*
* RTP data header
*/
typedef struct
{
    unsigned int cc:4;        /* CSRC count */
    unsigned int x:1;         /* header extension flag */
    unsigned int p:1;         /* padding flag */
    unsigned int version:2;   /* protocol version */
    unsigned int pt:7;        /* payload type */
    unsigned int m:1;         /* marker bit */    
}rtp_trivial_hdr_t;


typedef struct {
//#if BYTE_ORDER == BIG_ENDIAN
//    unsigned int version:2;   /* protocol version */
//    unsigned int p:1;         /* padding flag */
//    unsigned int x:1;         /* header extension flag */
//    unsigned int cc:4;        /* CSRC count */
//    unsigned int m:1;         /* marker bit */
//    unsigned int pt:7;        /* payload type */
//#else /* BYTE_ORDER == LITTLE_ENDIAN */
    //unsigned int cc:4;        /* CSRC count */
    //unsigned int x:1;         /* header extension flag */
    //unsigned int p:1;         /* padding flag */
    //unsigned int version:2;   /* protocol version */
    //unsigned int pt:7;        /* payload type */
    //unsigned int m:1;         /* marker bit */
//#endif
	u_int16_t reserved;		// msvc cannot put seq to the third byte, so reserved it manually
    u_int16_t seq;			  /* sequence number */
    u_int32_t ts;               /* timestamp */
    u_int32_t ssrc;             /* synchronization source */
/*       u_int32 csrc[1];     */     /* optional CSRC list */
} rtp_hdr_t;

#endif // !defined (RTP_H)

